﻿#include "TuxSpyAlarmDlg.h"
#include "TuxSpyFilterDlg.h"


wxString alarm_list_column[] = {
	wxT("Filter Name"),
	wxT("Enabled"),
	wxT("")
};

TuxSpyAlarmDlg::TuxSpyAlarmDlg( wxWindow* parent )
:
AlarmDlg( parent )
{

}

void TuxSpyAlarmDlg::OnInitDlg( wxInitDialogEvent& event )
{
	// TODO: Implement OnInitDlg
	InitControl();

}

void TuxSpyAlarmDlg::OnProductChoice( wxCommandEvent& event )
{
	// TODO: Implement OnProductChoice
}

void TuxSpyAlarmDlg::OnOKButton( wxCommandEvent& event )
{
	// TODO: Implement OnOKButton
}

void TuxSpyAlarmDlg::OnFilterNew( wxCommandEvent& event )
{
	// TODO: Implement OnOKButton
	TuxSpyFilterDlg* filterNew = new TuxSpyFilterDlg( this );
	filterNew->ShowModal();
}


int TuxSpyAlarmDlg::InitControl() 
{
	wxInt16 SvrCount = 0;
	long tmp = 0;

	wxListItem itemCol;

	// Server List Init
	for ( int i = 0; !alarm_list_column[i].IsEmpty(); i ++ ) {
		itemCol.SetText(alarm_list_column[i]);
		m_lstAlarmFilter->InsertColumn(i, itemCol);
	};

	//for( int i = 0; i< m_lstAlarmFilter->GetColumnCount(); i ++ )
	//	m_lstAlarmFilter->SetColumnWidth(i, wxLIST_AUTOSIZE_USEHEADER);

	return 1;

}